package com.bdqn.demo.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * @Description
 * @Author  tian
 * @Date 2021-11-23
 */
// @Entity

// @Table(name = "sys_user")

// 命名 QL 查询
// @NamedQueries(@NamedQuery(name = "SysUser.findUserByName",query = "select u from SysUser u where u.usrName =?1"))
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName( "sys_user" )
public class SysUser implements Serializable {
	private static final long serialVersionUID =  1L;
	// @Id
	// @GeneratedValue(strategy = GenerationType.IDENTITY)
	// @Column(name = "usr_id")
	// 编号

	// @TableField("usr_id")
	@TableId(type = IdType.AUTO)
	private Long usrId;

	// 姓名
	// @Column(name = "usr_name")
	// @TableField("usr_name")
	private String usrName;

	// 密码
	// @Column(name = "usr_password")
	// @TableField("usr_password")
	private String usrPassword;

	// 角色编号
	// @Column(name = "usr_role_id")
	// @TableField("usr_role_id")
	private Long usrRoleId;

	// 状态
	// @Column(name = "usr_flag")
	// @TableField("usr_flag")
	private Long usrFlag;

    public SysUser(Long usrId) {
    	this.usrId = usrId;
    }

    // public SysUser(String usrName, String usrPassword, Long usrRoleId, Long usrFlag) {
	// 	this.usrName = usrName;
	// 	this.usrPassword = usrPassword;
	// 	this.usrRoleId = usrRoleId;
	// 	this.usrFlag = usrFlag;
	// }

	// @Override
	// public String toString() {
	// 	return "SysUser{" + "usrName='" + usrName + '\'' + ", usrPassword='" + usrPassword + '\'' + ", usrRoleId=" + usrRoleId + ", usrFlag=" + usrFlag + '}';
	// }
}
